﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.master"
    Inherits="Customer_Select" CodeFile="Customer_Select.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>选择客户</title>
    <link href="../resources/styles/style.css" type="text/css" rel="stylesheet" />

    <script src="../JavaScript/common.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div>
        <table id="wsd_inputtable">
            <tr>
                <td class="tabletitle" colspan="8">
                    搜索门店
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    组织架构:
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox ID="txtOrg" runat="server" class="default" onkeydown="alert('请选择组织架构');return false;"
                        OnTextChanged="txtOrg_TextChanged"></asp:TextBox>
                    <img src="../Resources/Images/search.png" id="imgOrg alt="查找" style="cursor: pointer;" onclick="openPopup('../System/PopupOrganization.aspx?NameControlId=<%# txtOrg.UniqueID %>&ValueControlId=<%# txtHidOrg.UniqueID %>&ChainsControlID=<%# txtHidChains.UniqueID %>&UserListControlID=<%#txtHidUsers.UniqueID %>&SelectType=multi','','300','500');" />
                    <input id="txtHidOrg" type="hidden" runat="server" />

                    <br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="txtOrg" Display="Dynamic" ErrorMessage="请选择组织架构!"></asp:RequiredFieldValidator>

                </td>
                <td class="tablefield">
                    销售渠道:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList runat="server" ID="ddlChannel"  Width="150">
                    </asp:DropDownList>
                </td>
                <td class="tablefield">
                    关键字:
                </td>
                <td nowrap="nowrap">
                    <asp:TextBox runat="server" ID="txtCustomer" MaxLength="20" Width="150px" class="default" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="tablefield">
                    经销商:
                </td>
                <td nowrap="nowrap">
                    <asp:DropDownList ID="ddlChains" runat="server" Width="150"   >
                        <asp:ListItem Value="">--所有--</asp:ListItem>
                    </asp:DropDownList>
                    <input id="txtHidChains" type="hidden" runat="server" />
                </td>
                <td class="tablefield">
                    &nbsp;</td>
                <td nowrap="nowrap">
                    <input id="txtHidUsers" type="hidden" runat="server" />
                </td>
                <td class="tablefield">
                    &nbsp;</td>
                <td nowrap="nowrap">
                    
                    <asp:Button ID="btnQuery" runat="server" class="wsd_button2" Text="搜索门店" OnClick="btnQuery_Click" />
                    
                </td>
            </tr>
            <tr>
                <td class="buttonarea" colspan="6">
                    &nbsp;</td>
            </tr>
        </table>
        <br />
        <table id="wsd_inputtable">
            <tr>
                <td width="100%" class="tabletitle">
                    客户列表
                </td>
            </tr>
        </table>
        <table id="wsd_listtable" width="100%">
            <tr>
                <td style="width: 100%">
                    <asp:GridView Width="100%"  BorderWidth="0"  ID="gvCustomerList" runat="server" AutoGenerateColumns="false"
                        EmptyDataText="没有可显示的数据." EmptyDataRowStyle-Font-Bold="true" EmptyDataRowStyle-HorizontalAlign="Center"
                        EnableEmptyContentRender="true" OnRowDataBound="gvCustomerList_RowDataBound"
                        AllowPaging="True" OnPageIndexChanging="gvCustomerList_PageIndexChanging" 
                        PageSize="15" onrowcommand="gvCustomerList_RowCommand">
                        <HeaderStyle CssClass="titlist" />
                        <EmptyDataRowStyle HorizontalAlign="Center" Font-Bold="True"></EmptyDataRowStyle>
                        <Columns>
                       
                            <asp:BoundField HeaderText="门店编号" DataField="ID" />
                            <asp:BoundField HeaderText="门店名称" DataField="NAME" />
                            <asp:BoundField HeaderText="销售渠道" DataField="Channel" />
                            <asp:BoundField HeaderText="地址" DataField="ADDRESS_LINE" />
                            <asp:BoundField HeaderText="固定电话" DataField="TELEPHONE" />
                            <asp:BoundField HeaderText="手机" DataField="FAX" />
                            <asp:TemplateField HeaderText="选择">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btnSelect" runat="server" Text="选  择" CommandName="Sel" CommandArgument='<%# Eval("ID") %>' CssClass="btn3_mouseover" />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NumericFirstLast" PageButtonCount="20" />
                        <RowStyle CssClass="evenline" />
                        <AlternatingRowStyle CssClass="oddline" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>
